<template>
	<div>
		   <img v-lazy="imgObj"/>
	</div>
</template>
<script>
	export default{
		name:'lazy',
		data(){
			return {
				 imgObj: {
				 		//引入图片如果在js中必须require进来
				        src: require('../assets/success.jpg'),
				        error: require('../assets/error.jpg'),
				        loading: require('../assets/loading.gif')
				      },
			}
		}
	}
</script>
<style>
	html,body {
		padding: 0;
		margin: 0;
	}
	img {
	    width: 500px;
		height: 500px;
	};
</style>
